# -*- coding:utf-8 -*-

print 'Hello', 'LinqAlchemy', '!'

class ModelMixin(object):
    @classmethod
    def Hello(cls):
        return 'Hello'+'LinqAlchemy'+'!'

def linq_words(query):
    query.Where = query.filter
    #query.Select = session.query
    query.ToList = query.all
    query.FirstOrDefault = query.first
    query.Single = query.one
    query.Find = query.get
    query.Take = query.limit
    query.Skip = query.offset
    query.OrderBy = query.order_by
    query.SingleOrDefault = query.one_or_none #query.scalar不对
    query.Count = query.count
    return query


def DataSet(session, Model):
    query = session.query(Model)

    return linq_words(query)

